package com.truckdispatching.util;

import java.util.ArrayList;
import java.util.List;

public class ProvinceCityUtil {
	public static List<Province> provinces = new ArrayList<Province>();

	/**
	 * 获取所有省份
	 * 
	 * @return
	 */
	public static ArrayList<String> getProvinces() {
		ArrayList<String> pNames = new ArrayList<String>();
		for (Province province : provinces) {
			pNames.add(province.getName());
		}
		return pNames;
	}

	/**
	 * 根据省份获取所有城市名
	 * 
	 * @param pname
	 * @return
	 */
	public static ArrayList<String> getAllCitysByProvince(String pname) {
		ArrayList<String> cNames = new ArrayList<String>();
		for (Province province : provinces) {
			if (province.getName().equals(pname)) {
				List<City> citys = province.getCitys();
				for (City city : citys) {
					cNames.add(city.getName());
				}
			}
		}
		cNames.add("不限");
		return cNames;
	}

	/**
	 * 根据code返回城市
	 * 
	 * @param code
	 * @return
	 */
	public static String getPcNameByCode(String code) {
		if (code == null || "".equals(code) || "null".equals(code))
			return null;
		String pcName = "";
		for (Province province : provinces) {
			if (province.getCode().equals(code))
				return province.getName();
			List<City> citys = province.getCitys();
			for (City city : citys) {
				if (city.getCode().equals(code)) {
					pcName = province.getName() + " " + city.getName();
				}
			}
		}
		return pcName;
	}

	/**
	 * 根据名称返回城市code
	 * 
	 * @param pcName
	 * @return
	 */
	public static String getCodeByPcName(String pcName) {
		if (pcName == null || "".equals(pcName))
			return null;
		String[] pc = pcName.split(" ");
		for (Province province : provinces) {
			if (province.getName().equals(pc[0])) {
				if (pc.length == 1)
					return province.getCode();
				List<City> citys = province.getCitys();
				for (City city : citys) {
					if (city.getName().equals(pc[1])) {
						return city.getCode();
					}
				}
			}
		}
		return null;
	}

//	public static void importXml(InputStream fis) throws Exception {
//		if (provinces != null && provinces.size() > 0) {
//			if (fis != null) {
//				try {
//					fis.close();
//				} catch (IOException e) {
//				}
//			}
//			return;
//		}
//		try {
//			XmlPullParser parser = Xml.newPullParser();
//			parser.setInput(fis, "GBK");
//			Province province = null;
//			ArrayList<City> cities = null;
//			for (int eventType = parser.getEventType(); eventType != XmlPullParser.END_DOCUMENT; eventType = parser.next()) {
//				switch (eventType) {
//				case XmlPullParser.START_DOCUMENT:
//					break;
//				case XmlPullParser.START_TAG: {
//					String tagName = parser.getName();
//					if (tagName.equals("province")) {
//						province = new Province(parser.getAttributeValue(0), parser.getAttributeValue(1));
//						cities = new ArrayList<City>();
//					} else if (tagName.equals("city")) {
//						City city = new City(parser.getAttributeValue(0), parser.getAttributeValue(1));
//						cities.add(city);
//					}
//					break;
//				}
//				case XmlPullParser.END_TAG: {
//					String tagName = parser.getName();
//					if (tagName.equals("province")) {
//						ArrayList<City> cc = new ArrayList<City>(cities);
//						province.setCitys(cc);
//						provinces.add(province);
//					}
//					break;
//				}
//				default:
//					break;
//				}
//			}
//		} catch (Exception e) {
//			throw e;
//		} finally {
//			if (fis != null) {
//				try {
//					fis.close();
//				} catch (IOException e) {
//				}
//			}
//		}
//	}

	public static void importData() {
		if (provinces != null && provinces.size() > 0) {
			return;
		}
		Province province = null;
		ArrayList<City> cities = null;
		province = new Province("北京", "BJ");
		cities = new ArrayList<City>();
		cities.add(new City("东城区","BJ_BJ_DCQ"));
		cities.add(new City("西城区","BJ_BJ_XCQ"));
		cities.add(new City("朝阳区","BJ_BJ_CYQ"));
		cities.add(new City("丰台区","BJ_BJ_FTQ"));
		cities.add(new City("石景山区","BJ_BJ_SJSQ"));
		cities.add(new City("海淀区","BJ_BJ_HDQ"));
		cities.add(new City("门头沟区","BJ_BJ_MTGQ"));
		cities.add(new City("房山区","BJ_BJ_FSQ"));
		cities.add(new City("通州区","BJ_BJ_TZQ"));
		cities.add(new City("顺义区","BJ_BJ_SYQ"));
		cities.add(new City("昌平区","BJ_BJ_CPQ"));
		cities.add(new City("密云县","BJ_BJ_MYX"));
		cities.add(new City("延庆县","BJ_BJ_YQX"));
		cities.add(new City("大兴区","BJ_BJ_DXQ"));
		cities.add(new City("怀柔区","BJ_BJ_HRQ"));
		cities.add(new City("平谷区","BJ_BJ_PGQ"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("天津", "TJ");
		cities = new ArrayList<City>();
		cities.add(new City("和平区","TJ_TJ_HPQ"));
		cities.add(new City("河东区","TJ_TJ_HDQ"));
		cities.add(new City("河西区","TJ_TJ_HXQ"));
		cities.add(new City("南开区","TJ_TJ_NKQ"));
		cities.add(new City("河北区","TJ_TJ_HBQ"));
		cities.add(new City("红桥区","TJ_TJ_HQQ"));
		cities.add(new City("塘沽区","TJ_TJ_TGQ"));
		cities.add(new City("汉沽区","TJ_TJ_HGQ"));
		cities.add(new City("大港区","TJ_TJ_DGQ"));
		cities.add(new City("东丽区","TJ_TJ_DLQ"));
		cities.add(new City("西青区","TJ_TJ_XQQ"));
		cities.add(new City("津南区","TJ_TJ_JNQ"));
		cities.add(new City("北辰区","TJ_TJ_BCQ"));
		cities.add(new City("武清区","TJ_TJ_WQQ"));
		cities.add(new City("宝坻区","TJ_TJ_BC"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("河北", "HEB");
		cities = new ArrayList<City>();
		cities.add(new City("石家庄","HEB_SJZ"));
		cities.add(new City("唐山","HEB_TS"));
		cities.add(new City("秦皇岛","HEB_QHD"));
		cities.add(new City("邯郸","HEB_HD"));
		cities.add(new City("邢台","HEB_XT"));
		cities.add(new City("保定","HEB_BD"));
		cities.add(new City("张家口","HEB_ZJK"));
		cities.add(new City("承德","HEB_CD"));
		cities.add(new City("沧州","HEB_CZ"));
		cities.add(new City("廊坊","HEB_LF"));
		cities.add(new City("衡水","HEB_HS"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("山西", "SX");
		cities = new ArrayList<City>();
		cities.add(new City("太原","SX_TY"));
		cities.add(new City("大同","SX_DT"));
		cities.add(new City("阳泉","SX_YQ"));
		cities.add(new City("长治","SX_ZZ"));
		cities.add(new City("晋城","SX_JC"));
		cities.add(new City("朔州","SX_SZ"));
		cities.add(new City("晋中","SX_JZ"));
		cities.add(new City("运城","SX_YC"));
		cities.add(new City("忻州","SX_XZ"));
		cities.add(new City("临汾","SX_LF"));
		cities.add(new City("吕梁","SX_LL"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("内蒙古", "NMG");
		cities = new ArrayList<City>();
		cities.add(new City("呼和浩特","NMG_HHHT"));
		cities.add(new City("包头","NMG_BT"));
		cities.add(new City("乌海","NMG_WH"));
		cities.add(new City("赤峰","NMG_CF"));
		cities.add(new City("通辽","NMG_TL"));
		cities.add(new City("鄂尔多斯","NMG_EEDS"));
		cities.add(new City("呼伦贝尔","NMG_HLBE"));
		cities.add(new City("巴彦淖尔","NMG_BYNE"));
		cities.add(new City("乌兰察布","NMG_WLCB"));
		cities.add(new City("兴安盟","NMG_XAM"));
		cities.add(new City("锡林郭勒盟","锡林郭勒盟"));
		cities.add(new City("阿拉善盟","NMG_ALSM"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("辽宁", "LN");
		cities = new ArrayList<City>();
		cities.add(new City("东城区","BJ_BJ_DCQ"));
		cities.add(new City("沈阳","LN_SY"));
		cities.add(new City("大连","LN_DL"));
		cities.add(new City("鞍山","LN_AS"));
		cities.add(new City("抚顺","LN_FS"));
		cities.add(new City("本溪","LN_BXI"));
		cities.add(new City("丹东","LN_DD"));
		cities.add(new City("锦州","LN_JZ"));
		cities.add(new City("营口","LN_YK"));
		cities.add(new City("阜新","LN_FX"));
		cities.add(new City("辽阳","LN_LY"));
		cities.add(new City("盘锦","LN_PJ"));
		cities.add(new City("铁岭","LN_TL"));
		cities.add(new City("朝阳","LN_CY"));
		cities.add(new City("葫芦岛","LN_HLD"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("吉林", "JL");
		cities = new ArrayList<City>();
		cities.add(new City("长春","JL_ZC"));
		cities.add(new City("吉林","JL_JL"));
		cities.add(new City("四平","JL_SP"));
		cities.add(new City("辽源","JL_LY"));
		cities.add(new City("通化","JL_TH"));
		cities.add(new City("白山","JL_BS"));
		cities.add(new City("松原","JL_SY"));
		cities.add(new City("白城","JL_BC"));
		cities.add(new City("延边朝州","JL_YBCZ"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("黑龙江", "HLJ");
		cities = new ArrayList<City>();
		cities.add(new City("哈尔滨","HLJ_HEB"));
		cities.add(new City("齐齐哈尔","HLJ_QQHE"));
		cities.add(new City("鸡西","HLJ_JX"));
		cities.add(new City("鹤岗","HLJ_HG"));
		cities.add(new City("双鸭山","HLJ_SYS"));
		cities.add(new City("大庆","HLJ_DQ"));
		cities.add(new City("伊春","HLJ_YC"));
		cities.add(new City("佳木斯","HLJ_JMS"));
		cities.add(new City("七台河","HLJ_QTH"));
		cities.add(new City("牡丹江","HLJ_MDJ"));
		cities.add(new City("黑河","HLJ_SH"));
		cities.add(new City("绥化","HLJ_SH"));
		cities.add(new City("大兴安岭","HLJ_DXAL"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("上海", "SH");
		cities = new ArrayList<City>();
		cities.add(new City("黄浦区","SH_SH_HPQ"));
		cities.add(new City("卢湾区","SH_SH_LWQ"));
		cities.add(new City("徐汇区","SH_SH_XHQ"));
		cities.add(new City("长宁区","SH_SH_ZNQ"));
		cities.add(new City("静安区","SH_SH_JAQ"));
		cities.add(new City("普陀区","SH_SH_PTQ"));
		cities.add(new City("闸北区","SH_SH_ZBQ"));
		cities.add(new City("虹口区","SH_SH_HKQ"));
		cities.add(new City("杨浦区","SH_SH_YPQ"));
		cities.add(new City("闵行区","SH_SH_MXQ"));
		cities.add(new City("宝山区","SH_SH_BSQ"));
		cities.add(new City("嘉定区","SH_SH_JDQ"));
		cities.add(new City("浦东新区","SH_SH_PDXQ"));
		cities.add(new City("金山区","SH_SH_JSQ"));
		cities.add(new City("松江区","SH_SH_SJQ"));
		cities.add(new City("青浦区","SH_SH_QPQ"));
		cities.add(new City("南汇区","SH_SH_NHQ"));
		cities.add(new City("奉贤区","SH_SH_FXQ"));
		cities.add(new City("崇明县","SH_SH_CM"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("江苏", "JS");
		cities = new ArrayList<City>();
		cities.add(new City("南京","JS_NJ"));
		cities.add(new City("无锡","JS_WX"));
		cities.add(new City("徐州","JS_XZ"));
		cities.add(new City("常州","JS_CZ"));
		cities.add(new City("苏州","JS_SZ"));
		cities.add(new City("南通","JS_NT"));
		cities.add(new City("连云港","JS_LYG"));
		cities.add(new City("淮安","JS_HA"));
		cities.add(new City("盐城","JS_YC"));
		cities.add(new City("扬州","JS_YZ"));
		cities.add(new City("镇江","JS_ZJ"));
		cities.add(new City("泰州","JS_TZ"));
		cities.add(new City("宿迁","JS_SQ"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("浙江", "ZJ");
		cities = new ArrayList<City>();
		cities.add(new City("杭州","ZJ_HZ"));
		cities.add(new City("宁波","ZJ_NB"));
		cities.add(new City("温州","ZJ_WZ"));
		cities.add(new City("嘉兴","ZJ_JX"));
		cities.add(new City("湖州","ZJ_HUZ"));
		cities.add(new City("绍兴","ZJ_SX"));
		cities.add(new City("金华","ZJ_JH"));
		cities.add(new City("衢州","ZJ_QZ"));
		cities.add(new City("舟山","ZJ_ZS"));
		cities.add(new City("台州","ZJ_TZ"));
		cities.add(new City("丽水","ZJ_LS"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("安徽", "AH");
		cities = new ArrayList<City>();
		cities.add(new City("合肥","AH_HF"));
		cities.add(new City("芜湖","AH_WH"));
		cities.add(new City("蚌埠","AH_BB"));
		cities.add(new City("淮南","AH_HN"));
		cities.add(new City("马鞍山","AH_MAS"));
		cities.add(new City("淮北","AH_HB"));
		cities.add(new City("铜陵","AH_TL"));
		cities.add(new City("安庆","AH_AQ"));
		cities.add(new City("黄山","AH_HS"));
		cities.add(new City("滁州","AH_CHZ"));
		cities.add(new City("阜阳","AH_FY"));
		cities.add(new City("宿州","AH_SZ"));
		cities.add(new City("巢湖","AH_CH"));
		cities.add(new City("六安","AH_LA"));
		cities.add(new City("亳州","AH_BZ"));
		cities.add(new City("池州","AH_CZ"));
		cities.add(new City("宣城","AH_XC"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("福建", "FJ");
		cities = new ArrayList<City>();
		cities.add(new City("福州","FJ_FZ"));
		cities.add(new City("厦门","FJ_XM"));
		cities.add(new City("莆田","FJ_PT"));
		cities.add(new City("三明","FJ_SM"));
		cities.add(new City("泉州","FJ_QZ"));
		cities.add(new City("漳州","FJ_ZZ"));
		cities.add(new City("南平","FJ_NP"));
		cities.add(new City("龙岩","FJ_LY"));
		cities.add(new City("宁德","FJ_ND"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("江西", "JX");
		cities = new ArrayList<City>();
		cities.add(new City("南昌","JX_NC"));
		cities.add(new City("景德镇","JX_JDZ"));
		cities.add(new City("萍乡","JX_PX"));
		cities.add(new City("九江","JX_JJ"));
		cities.add(new City("新余","JX_XY"));
		cities.add(new City("鹰潭","JX_YT"));
		cities.add(new City("赣州","JX_GZ"));
		cities.add(new City("吉安","JX_JA"));
		cities.add(new City("宜春","JX_YC"));
		cities.add(new City("抚州","JX_FZ"));
		cities.add(new City("上饶","JX_SR"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("山东", "SD");
		cities = new ArrayList<City>();
		cities.add(new City("济南","SD_JNA"));
		cities.add(new City("青岛","SD_QD"));
		cities.add(new City("淄博","SD_ZB"));
		cities.add(new City("枣庄","SD_ZZ"));
		cities.add(new City("东营","SD_DY"));
		cities.add(new City("烟台","SD_YT"));
		cities.add(new City("潍坊","SD_WF"));
		cities.add(new City("济宁","SD_JN"));
		cities.add(new City("泰安","SD_TA"));
		cities.add(new City("威海","SD_WH"));
		cities.add(new City("日照","SD_RZ"));
		cities.add(new City("莱芜","SD_LW"));
		cities.add(new City("临沂","SD_LY"));
		cities.add(new City("德州","SD_DZ"));
		cities.add(new City("聊城","SD_LC"));
		cities.add(new City("滨州","SD_BZ"));
		cities.add(new City("菏泽","SD_HZ"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("河南", "HEN");
		cities = new ArrayList<City>();
		cities.add(new City("郑州","HEN_ZZ"));
		cities.add(new City("开封","HEN_KF"));
		cities.add(new City("洛阳","HEN_LY"));
		cities.add(new City("平顶山","HEN_PDS"));
		cities.add(new City("安阳","HEN_AY"));
		cities.add(new City("鹤壁","HEN_HB"));
		cities.add(new City("新乡","HEN_XX"));
		cities.add(new City("焦作","HEN_JZ"));
		cities.add(new City("濮阳","HEN_PY"));
		cities.add(new City("许昌","HEN_XC"));
		cities.add(new City("漯河","HEN_LH"));
		cities.add(new City("三门峡","HEN_SMX"));
		cities.add(new City("南阳","HEN_NY"));
		cities.add(new City("商丘","HEN_SQ"));
		cities.add(new City("信阳","HEN_XY"));
		cities.add(new City("周口","HEN_ZK"));
		cities.add(new City("驻马店","HEN_ZMD"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("湖北", "HB");
		cities = new ArrayList<City>();
		cities.add(new City("武汉","HB_WH"));
		cities.add(new City("黄石","HB_HS"));
		cities.add(new City("十堰","HB_SY"));
		cities.add(new City("宜昌","HB_YC"));
		cities.add(new City("襄樊","HB_XF"));
		cities.add(new City("鄂州","HB_EZ"));
		cities.add(new City("荆门","HB_JM"));
		cities.add(new City("孝感","HB_XG"));
		cities.add(new City("荆州","HB_JZ"));
		cities.add(new City("黄冈","HB_HG"));
		cities.add(new City("咸宁","HB_XN"));
		cities.add(new City("随州","HB_SZ"));
		cities.add(new City("恩施州","HB_ESZ"));
		cities.add(new City("潜江市","HB_QJ"));
		cities.add(new City("神农架林区","HB_SNJLQ"));
		cities.add(new City("天门市","HB_TM"));
		cities.add(new City("仙桃市","HB_XT"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("湖南", "HUN");
		cities = new ArrayList<City>();
		cities.add(new City("长沙","HUN_ZS"));
		cities.add(new City("株洲","HUN_ZZ"));
		cities.add(new City("湘潭","HUN_XT"));
		cities.add(new City("衡阳","HUN_HY"));
		cities.add(new City("邵阳","HUN_SY"));
		cities.add(new City("岳阳","HUN_YY"));
		cities.add(new City("常德","HUN_CD"));
		cities.add(new City("张家界","HUN_ZJJ"));
		cities.add(new City("益阳","HUN_YIY"));
		cities.add(new City("郴州","HUN_CZ"));
		cities.add(new City("永州","HUN_YZ"));
		cities.add(new City("怀化","HUN_HH"));
		cities.add(new City("娄底","HUN_LD"));
		cities.add(new City("湘西州","HUN_XXZ"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("广东", "GD");
		cities = new ArrayList<City>();
		cities.add(new City("广州","GD_GZ"));
		cities.add(new City("韶关","GD_SG"));
		cities.add(new City("深圳","GD_SZ"));
		cities.add(new City("珠海","GD_ZH"));
		cities.add(new City("汕头","GD_ST"));
		cities.add(new City("佛山","GD_FS"));
		cities.add(new City("江门","GD_JM"));
		cities.add(new City("湛江","GD_ZJ"));
		cities.add(new City("茂名","GD_MM"));
		cities.add(new City("肇庆","GD_ZQ"));
		cities.add(new City("惠州","GD_HZ"));
		cities.add(new City("梅州","GD_MZ"));
		cities.add(new City("汕尾","GD_SW"));
		cities.add(new City("河源","GD_HY"));
		cities.add(new City("阳江","GD_YJ"));
		cities.add(new City("清远","GD_QY"));
		cities.add(new City("东莞","GD_DG"));
		cities.add(new City("中山","GD_ZS"));
		cities.add(new City("潮州","GD_CZ"));
		cities.add(new City("揭阳","GD_JY"));
		cities.add(new City("云浮","GD_YF"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("广西", "GX");
		cities = new ArrayList<City>();
		cities.add(new City("南宁","GX_NN"));
		cities.add(new City("柳州","GX_LZ"));
		cities.add(new City("桂林","GX_GL"));
		cities.add(new City("梧州","GX_WZ"));
		cities.add(new City("北海","GX_BH"));
		cities.add(new City("防城港","GX_FCG"));
		cities.add(new City("钦州","GX_QZ"));
		cities.add(new City("贵港","GX_GG"));
		cities.add(new City("玉林","GX_YL"));
		cities.add(new City("百色","GX_BS"));
		cities.add(new City("贺州","GX_HZ"));
		cities.add(new City("河池","GX_HC"));
		cities.add(new City("来宾","GX_LB"));
		cities.add(new City("崇左","GX_CZ"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("海南", "HN");
		cities = new ArrayList<City>();
		cities.add(new City("海口","HN_HK"));
		cities.add(new City("三亚","HN_SY"));
		cities.add(new City("省直辖县","HN_SZXX"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("重庆", "ZQ");
		cities = new ArrayList<City>();
		cities.add(new City("万州区","ZQ_ZQ_WZQ"));
		cities.add(new City("涪陵区","ZQ_ZQ_FLQ"));
		cities.add(new City("渝中区","ZQ_ZQ_YZQ"));
		cities.add(new City("大渡口区","ZQ_ZQ_DDKQ"));
		cities.add(new City("江北区","ZQ_ZQ_JBQ"));
		cities.add(new City("沙坪坝区","ZQ_ZQ_SPBQ"));
		cities.add(new City("九龙坡区","ZQ_ZQ_JLPQ"));
		cities.add(new City("南岸区","ZQ_ZQ_NAQ"));
		cities.add(new City("北碚区","ZQ_ZQ_BBQ"));
		cities.add(new City("万盛区","ZQ_ZQ_WSQ"));
		cities.add(new City("双桥区","ZQ_ZQ_SQQ"));
		cities.add(new City("渝北区","ZQ_ZQ_YBQ"));
		cities.add(new City("巴南区","ZQ_ZQ_BNQ"));
		cities.add(new City("黔江区","ZQ_ZQ_QJQ"));
		cities.add(new City("长寿区","ZQ_ZQ_ZSQ"));
		cities.add(new City("綦江县","ZQ_ZQ_QJX"));
		cities.add(new City("潼南县","ZQ_ZQ_TNX"));
		cities.add(new City("铜梁县","ZQ_ZQ_TLX"));
		cities.add(new City("大足县","ZQ_ZQ_DZX"));
		cities.add(new City("荣昌县","ZQ_ZQ_RCX"));
		cities.add(new City("璧山县","ZQ_ZQ_BSX"));
		cities.add(new City("梁平县","ZQ_ZQ_LPX"));
		cities.add(new City("城口县","ZQ_ZQ_CKX"));
		cities.add(new City("丰都县","ZQ_ZQ_FDX"));
		cities.add(new City("垫江县","ZQ_ZQ_DJX"));
		cities.add(new City("武隆县","ZQ_ZQ_WLX"));
		cities.add(new City("忠县","ZQ_ZQ_ZX"));
		cities.add(new City("开县","ZQ_ZQ_KX"));
		cities.add(new City("云阳县","ZQ_ZQ_YUYX"));
		cities.add(new City("奉节县","ZQ_ZQ_FJX"));
		cities.add(new City("巫山县","ZQ_ZQ_WSX"));
		cities.add(new City("巫溪县","ZQ_ZQ_WXX"));
		cities.add(new City("石柱县","ZQ_ZQ_SZX"));
		cities.add(new City("秀山县","ZQ_ZQ_XSX"));
		cities.add(new City("酉阳县","ZQ_ZQ_YYX"));
		cities.add(new City("彭水县","ZQ_ZQ_PSX"));
		cities.add(new City("江津","ZQ_ZQ_JJ"));
		cities.add(new City("合川","ZQ_ZQ_HC"));
		cities.add(new City("永川","ZQ_ZQ_YC"));
		cities.add(new City("南川","ZQ_ZQ_NC"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("四川", "SC");
		cities = new ArrayList<City>();
		cities.add(new City("成都","SC_CD"));
		cities.add(new City("自贡","SC_ZG"));
		cities.add(new City("攀枝花","SC_PZH"));
		cities.add(new City("泸州","SC_LZ"));
		cities.add(new City("德阳","SC_DY"));
		cities.add(new City("绵阳","SC_MY"));
		cities.add(new City("广元","SC_GY"));
		cities.add(new City("遂宁","SC_SN"));
		cities.add(new City("内江","SC_NJ"));
		cities.add(new City("乐山","SC_LS"));
		cities.add(new City("南充","SC_NC"));
		cities.add(new City("眉山","SC_MS"));
		cities.add(new City("宜宾","SC_YB"));
		cities.add(new City("广安","SC_GA"));
		cities.add(new City("达州","SC_DZ"));
		cities.add(new City("雅安","SC_YA"));
		cities.add(new City("巴中","SC_BZ"));
		cities.add(new City("资阳","SC_ZY"));
		cities.add(new City("阿坝州","SC_ABZ"));
		cities.add(new City("甘孜藏族","SC_GZZZ"));
		cities.add(new City("凉山彝族","SC_LSYZ"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("贵州", "GZ");
		cities = new ArrayList<City>();
		cities.add(new City("贵阳","GZ_GY"));
		cities.add(new City("六盘水","GZ_LPS"));
		cities.add(new City("遵义","GZ_ZY"));
		cities.add(new City("安顺","GZ_AS"));
		cities.add(new City("铜仁地区","GZ_TRDQ"));
		cities.add(new City("黔西南州","GZ_QXNZ"));
		cities.add(new City("毕节地区","GZ_BJDQ"));
		cities.add(new City("黔东南州","GZ_QDNZ"));
		cities.add(new City("黔南州","GZ_QNZ"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("云南", "YN");
		cities = new ArrayList<City>();
		cities.add(new City("昆明","YN_KM"));
		cities.add(new City("曲靖","YN_QJ"));
		cities.add(new City("玉溪","YN_YX"));
		cities.add(new City("保山","YN_BS"));
		cities.add(new City("昭通","YN_ZT"));
		cities.add(new City("丽江","YN_LJ"));
		cities.add(new City("思茅","YN_SM"));
		cities.add(new City("临沧","YN_LC"));
		cities.add(new City("楚雄州","YN_CXZ"));
		cities.add(new City("红河州","YN_HHZ"));
		cities.add(new City("文山州","YN_WSZ"));
		cities.add(new City("西双版纳","YN_XSBN"));
		cities.add(new City("大理州","YN_DLZ"));
		cities.add(new City("德宏州","YN_DHZ"));
		cities.add(new City("怒江州","YN_NJZ"));
		cities.add(new City("迪庆州","YN_DQZ"));
		cities.add(new City("普洱","YN_PE"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("陕西", "SHX");
		cities = new ArrayList<City>();
		cities.add(new City("西安","SHX_XA"));
		cities.add(new City("铜川","SHX_TC"));
		cities.add(new City("宝鸡","SHX_BJ"));
		cities.add(new City("咸阳","SHX_XY"));
		cities.add(new City("渭南","SHX_WN"));
		cities.add(new City("延安","SHX_YA"));
		cities.add(new City("汉中","SHX_HZ"));
		cities.add(new City("榆林","SHX_YL"));
		cities.add(new City("安康","SHX_AK"));
		cities.add(new City("商洛","SHX_SL"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("甘肃", "GS");
		cities = new ArrayList<City>();
		cities.add(new City("兰州","GS_LZ"));
		cities.add(new City("嘉峪关","GS_JYG"));
		cities.add(new City("金昌","GS_JC"));
		cities.add(new City("白银","GS_BY"));
		cities.add(new City("天水","GS_TS"));
		cities.add(new City("武威","GS_WW"));
		cities.add(new City("张掖","GS_ZY"));
		cities.add(new City("平凉","GS_PL"));
		cities.add(new City("酒泉","GS_JQ"));
		cities.add(new City("庆阳","GS_QY"));
		cities.add(new City("定西","GS_DX"));
		cities.add(new City("陇南","GS_LN"));
		cities.add(new City("临夏州","GS_LXZ"));
		cities.add(new City("甘南州","GS_GNZ"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("青海", "QH");
		cities = new ArrayList<City>();
		cities.add(new City("西宁","QH_XN"));
		cities.add(new City("海东地区","QH_HDDQ"));
		cities.add(new City("海北州","QH_HBZ"));
		cities.add(new City("黄南州","QH_HUNZ"));
		cities.add(new City("海南州","QH_HNZ"));
		cities.add(new City("果洛州","QH_GLZ"));
		cities.add(new City("玉树州","QH_YSZ"));
		cities.add(new City("海西州","QH_HXZ"));
		province.setCitys(cities);
		provinces.add(province);
		province = new Province("宁夏", "NX");
		cities = new ArrayList<City>();
		cities.add(new City("银川","NX_YC"));
		cities.add(new City("石嘴山","NX_SZS"));
		cities.add(new City("吴忠","NX_WZ"));
		cities.add(new City("固原","NX_GY"));
		cities.add(new City("中卫","NX_ZW"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("新疆", "XJ");
		cities = new ArrayList<City>();
		cities.add(new City("东城区","BJ_BJ_DCQ"));
		cities.add(new City("乌鲁木齐","XJ_WLMQ"));
		cities.add(new City("克拉玛依","XJ_KLMY"));
		cities.add(new City("吐鲁番地区","XJ_TLFDQ"));
		cities.add(new City("哈密地区","XJ_HMDQ"));
		cities.add(new City("昌吉州","XJ_CJZ"));
		cities.add(new City("博尔塔拉","XJ_BETL"));
		cities.add(new City("巴音郭楞","XJ_BYGL"));
		cities.add(new City("阿克苏地区","XJ_AKSDQ"));
		cities.add(new City("克孜勒苏","XJ_KZLS"));
		cities.add(new City("喀什地区","XJ_KSDQ"));
		cities.add(new City("和田地区","XJ_HTDQ"));
		cities.add(new City("伊犁州","XJ_YLZ"));
		cities.add(new City("塔城地区","XJ_TCDQ"));
		cities.add(new City("阿勒泰地区","XJ_ALTDQ"));
		cities.add(new City("省辖县","XJ_SXX"));
		province.setCitys(cities);
		provinces.add(province);

		province = new Province("台湾", "TW");
		cities = new ArrayList<City>();
		cities.add(new City("台湾","TW_TW"));
		province.setCitys(cities);
		provinces.add(province);

		province = new Province("香港", "XG");
		cities = new ArrayList<City>();
		cities.add(new City("香港","XG_XG"));
		province.setCitys(cities);
		provinces.add(province);
		
		province = new Province("澳门", "AM");
		cities = new ArrayList<City>();
		cities.add(new City("澳门","AM_AM"));
	}
}
